<template>
  <a-modal
    title="流程图"
    :visible="visible"
    :dialog-style="{ top: '20px' }"
    :confirm-loading="loading"
    width="1000px"
    @ok="visible = false"
    @cancel="visible = false"
    :cancelButtonProps="{
      style:{
        display:'none'
      }
    }"
  >
    <img :src="imageUrl">
  </a-modal>
</template>

<script>

import { getTaskImage } from '@/api/workflow/workflow'

export default {
  name: 'TaskFlowImage',
  props: {
  },
  data () {
    return {
      // 显示弹框
      visible: false,
      // 遮罩
      loading: false,
      imageUrl: undefined
    }
  },
  watch: {
  },
  methods: {
    getImage (bizId) {
      getTaskImage(bizId).then(res => {
        this.imageUrl = 'data:image/png;base64,' + res.data
      })
    },
    show (bizId) {
      this.visible = true
      this.getImage(bizId)
    }
  }
}
</script>

<style scoped>

</style>
